﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CreateMcode.aspx.cs" Inherits="RGPWEB.admin.MCode.CreateMcode" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>组合物料编码</title>
     <link href="../../inc/Style/index.css" rel="stylesheet" type="text/css" />
    <link href="../../inc/Style/childindex.css" rel="stylesheet" type="text/css" />
    <link href="../../inc/Style/GridView.css" rel="stylesheet" type="text/css" />
  
    <style type="text/css">
        .style1
        {
            width: 100%;
            height: 26px;
        }
        .style2
        {
            width: 65px;
        }
        .style3
        {
            width: 617px;
        }
        .style4
        {
            width: 169px;
        }
        .style5
        {
            width: 100%;
        }
        .style6
        {
            width: 67px;
        }
        .style7
        {
            width: 135px;
        }
        .style8
        {
            width: 67px;
            height: 12px;
        }
        .style9
        {
            width: 135px;
            height: 12px;
        }
        .style10
        {
            height: 12px;
        }
        .style11
        {
            height: 12px;
            width: 96px;
        }
        .style12
        {
            width: 96px;
        }
        .style13
        {
            height: 12px;
            width: 78px;
        }
        .style14
        {
            width: 78px;
        }
        .style15
        {
            height: 12px;
            width: 156px;
        }
        .style16
        {
            width: 156px;
        }
        .style18
        {
            width: 42px;
        }
        .style19
        {
            width: 130px;
        }
    </style>
  
</head>
<body>
    <form id="form1" runat="server">
    <div>
       <asp:Panel ID="TitlePanel" runat="server" CssClass="titlePadding" Height="21px" 
        Width="800px">
        组合物料编码
    </asp:Panel>      
    </div>
    <div>
    </div>
    
    <div>
        <div>
            <table class="style1">
                <tr>
                    <td class="style3">
                        <asp:Image ID="Image1" runat="server" 
                            ImageUrl="~/inc/images/MRuleImg/00.png" />
                    </td>
                    <td>
                        <asp:TextBox ID="tbMcodeNote" runat="server" Height="189px" TextMode="MultiLine" 
                            Width="310px" ReadOnly="True" CausesValidation="True"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    
    
    <div>
    </div>
    <div>
    <div>
    
        <table class="style1">
            <tr>
                <td class="style2">
                    选择类别：</td>
                <td class="style4">
                    <asp:DropDownList ID="DropDownList1" runat="server" Height="16px" Width="257px" 
                        DataSourceID="obsDropListBigClass" DataTextField="ClassGroupName" 
                        DataValueField="ClassGroup" AppendDataBoundItems="True" 
                        AutoPostBack="True" 
                        onselectedindexchanged="DropDownList1_SelectedIndexChanged">
                        <asp:ListItem Value="all">—选择组名—</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style2">
                    <asp:Button ID="ButtonRule" runat="server" Text="筛选" 
                        onclick="ButtonRule_Click" Height="21px" Width="77px" Visible="False" />
                </td>
                <td class="style18">
                    &nbsp;</td>
                <td class="style19">
                    编码长度（不含点）：</td>
                <td>
                    <asp:TextBox ID="tbMcodeLength" runat="server" Width="30px">15</asp:TextBox>
                        </td>
                <td>
                    <asp:Button ID="ButtonClear" runat="server" onclick="Button1_Click1" 
                        Text="清空注释" />
                        </td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
    
        <asp:GridView ID="GridView1" runat="server" BackColor="White" 
            BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
            ForeColor="Black" GridLines="Vertical" Width="100%" AllowSorting="True" 
            AutoGenerateColumns="False" DataKeyNames="ClassId" 
            DataSourceID="ObjectDataSource1" ShowFooter="True">
            <RowStyle BackColor="#F7F7DE" />
            <Columns>
                <asp:BoundField DataField="ClassId" HeaderText="ClassId" ReadOnly="True" 
                    SortExpression="ClassId" Visible="False" />
                <asp:BoundField DataField="ClassGroup" HeaderText="组别" 
                    SortExpression="ClassGroup" />
                <asp:TemplateField HeaderText="组名" SortExpression="ClassGroupName">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox11" runat="server" Text='<%# Bind("ClassGroupName") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:Button ID="ButtonCreateMcode" runat="server" 
                            onclick="ButtonCreateMcode_Click" Text="组合料号" />
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label11" runat="server" Text='<%# Bind("ClassGroupName") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="总类" SortExpression="ClassType0">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("ClassType0") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="tbCT0" runat="server" Width="70px"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbCT0" runat="server" Text='<%# Bind("ClassType0") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="分类" SortExpression="ClassType1">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("ClassType1") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="tbCT1" runat="server" Width="70px"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbCT1" runat="server" Text='<%# Bind("ClassType1") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="子类1" SortExpression="ClassType2">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("ClassType2") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="tbCT2" runat="server" Width="70px"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbCT2" runat="server" Text='<%# Bind("ClassType2") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="子类2" SortExpression="ClassType3">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("ClassType3") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="tbCT3" runat="server" Width="70px"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbCT3" runat="server" Text='<%# Bind("ClassType3") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="子类3" SortExpression="ClassType4">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("ClassType4") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="tbCT4" runat="server" Width="70px"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbCT4" runat="server" Text='<%# Bind("ClassType4") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="子类4" SortExpression="ClassType5">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("ClassType5") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="tbCT5" runat="server" Width="70px"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbCT5" runat="server" Text='<%# Bind("ClassType5") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="子类5" SortExpression="ClassType6">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("ClassType6") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="tbCT6" runat="server" Width="70px"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbCT6" runat="server" Text='<%# Bind("ClassType6") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="子类6" SortExpression="ClassType7">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("ClassType7") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="tbCT7" runat="server" Width="70px"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbCT7" runat="server" Text='<%# Bind("ClassType7") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="子类7" SortExpression="ClassType8">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("ClassType8") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="tbCT8" runat="server" Width="70px"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbCT8" runat="server" Text='<%# Bind("ClassType8") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="子类8" SortExpression="ClassType9">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox10" runat="server" Text='<%# Bind("ClassType9") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="tbCT9" runat="server" Width="70px"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbCT9" runat="server" Text='<%# Bind("ClassType9") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="ClassImagePath" HeaderText="ClassImagePath" 
                    SortExpression="ClassImagePath" Visible="False" />
                <asp:BoundField DataField="ClassNote" HeaderText="备注" 
                    SortExpression="ClassNote" />
            </Columns>
            <FooterStyle BackColor="#CCCC99" />
            <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
    
    </div>
    </div>
    
    <div>
    </div>
    <div>
        <table class="style5">
            <tr>
                <td class="style8">
                    </td>
                <td class="style9">
                </td>
                <td class="style11">
                </td>
                <td class="style13">
                    </td>
                <td class="style15">
                    </td>
                <td class="style10">
                    </td>
                <td class="style10">
                    </td>
                <td class="style10">
                    </td>
            </tr>
            <tr>
                <td class="style6">
                    选择子类：</td>
                <td class="style7">
                    <asp:DropDownList ID="DropDownList2" runat="server" AppendDataBoundItems="True" 
                        AutoPostBack="True" DataSourceID="obsDropListSubClass" 
                        DataTextField="ClassItem" DataValueField="ClassItem" Height="16px" 
                        Width="134px">
                        <asp:ListItem Value="all">—选择编号—</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style12">
                    <asp:Button ID="ButtonSubRule" runat="server" Height="20px" 
                        onclick="Button1_Click" Text="再筛选" Width="74px" Visible="False" />
                </td>
                <td class="style14">
                    物料编码：</td>
                <td class="style16">
                    <asp:TextBox ID="tbMcodeFinal" runat="server" Height="18px" Width="148px"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
    </div>
    <div>
        <asp:GridView ID="GridView2" runat="server" AllowSorting="True" 
            AutoGenerateColumns="False" BackColor="White" BorderColor="#DEDFDE" 
            BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="id" 
            DataSourceID="ObjectDataSource2" ForeColor="Black" GridLines="Vertical" 
            Width="100%" onselectedindexchanging="GridView2_SelectedIndexChanging">
            <RowStyle BackColor="#F7F7DE" />
            <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" 
                    ReadOnly="True" SortExpression="id" Visible="False" />
                <asp:BoundField DataField="ClassItem" HeaderText="编号" 
                    SortExpression="ClassItem" />
                <asp:BoundField DataField="ClassCode" HeaderText="代码" 
                    SortExpression="ClassCode" />
                <asp:BoundField DataField="ClassType" HeaderText="类型" 
                    SortExpression="ClassType" />
                <asp:BoundField DataField="ClassGroup" HeaderText="组别" 
                    SortExpression="ClassGroup" />
                <asp:BoundField DataField="ClassGroupName" HeaderText="组名" 
                    SortExpression="ClassGroupName" />
                <asp:BoundField DataField="ClassNote" HeaderText="备注" 
                    SortExpression="ClassNote" />
            </Columns>
            <FooterStyle BackColor="#CCCC99" />
            <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
</div>
    <div>
    </div>
    <div>
        <asp:ObjectDataSource ID="obsDropListBigClass" runat="server" 
            OldValuesParameterFormatString="original_{0}" SelectMethod="GetGroupName" 
            TypeName="RGPWEB.App_Code.BLL.MCodeSplitBll">
        </asp:ObjectDataSource>
        <asp:ObjectDataSource ID="obsDropListSubClass" runat="server" 
            OldValuesParameterFormatString="original_{0}" SelectMethod="GetClassItem" 
            TypeName="MCodeBll"></asp:ObjectDataSource>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
            OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByGroup" 
            TypeName="RGPWEB.App_Code.BLL.MCodeSplitBll">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropDownList1" Name="ClassGroup" 
                    PropertyName="SelectedValue" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
            OldValuesParameterFormatString="original_{0}" 
            SelectMethod="GetDataByItem_Group" TypeName="MCodeBll">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropDownList2" Name="classItem" 
                    PropertyName="SelectedValue" Type="String" />
                <asp:ControlParameter ControlID="DropDownList1" Name="classGroup" 
                    PropertyName="SelectedValue" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
    </form>
    </body>
</html>
